home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / os2 / fst03f.zip / fst.doc < prev    next >
Text File  |  1996-08-13  |  37KB  |  1,207 lines

  1. ===============================================================================
  2. fst.doc      fst 0.3f                                               13-Aug-1996
  3. ===============================================================================
  4.                                      Copyright (c) 1995-1996 by Eberhard Mattes
  5.  
  6. License
  7. =======
  8.  
  9. fst is free software; you can redistribute it and/or modify it under
  10. the terms of the GNU General Public License as published by the Free
  11. Software Foundation; either version 2, or (at your option) any later
  12. version.
  13.  
  14. fst is distributed in the hope that it will be useful, but WITHOUT ANY
  15. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17. for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with fst; see the file COPYING.  If not, write to the Free
  21. Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  22. 02111-1307, USA.
  23.  
  24.  
  25. What is fst?
  26. ============
  27.  
  28. fst (File System Tool) is a tool for checking filesystems, like
  29. CHKDSK, and for displaying information about filesystems.  Currently,
  30. fst supports HPFS and FAT (FAT support is quite untested).
  31.  
  32. Unlike CHKDSK, fst does not fix the errors it finds.
  33.  
  34. I wrote fst after a HPFS partition was corrupted by an HPFS bug three
  35. times in a single day.  I wanted to know exactly what's going wrong.
  36.  
  37. Why another CHKDSK?  Well, CHKDSK has several problems:
  38.  
  39. - CHKDSK does not show the names of all files known to be corrupt (or
  40.   corrupted by CHKDSK).  For instance, if n files share data sectors,
  41.   the names of only n-1 files are printed; CHKDSK won't tell you about
  42.   one file which is probably damaged out of each group of files
  43.   sharing sectors
  44.  
  45. - CHKDSK sometimes corrupts the file system even more than it was
  46.   before running CHKDSK.  fst can save a snapshot of all relevant
  47.   sectors to a file.  After running CHKDSK, you can compare the disk
  48.   to the snapshot file to find out what sectors have been changed by
  49.   CHKDSK.  You can even restore the sectors from the snapshot file to
  50.   the disk to undo CHKDSK's fixes.
  51.  
  52. - CHKDSK sometimes gives false alarms, complaining about errors
  53.   which don't exist and which it won't fix.  For instance, CHKDSK
  54.   apparently has problems with extended attributes of type 2 (FNODE
  55.   pointing to an ALSEC).
  56.  
  57. - CHKDSK cannot fix certain types of HPFS corruption (for instance,
  58.   sectors shared by Spare DIRBLKs and extended attributes).  To be
  59.   able to fix the errors manually with a sector editor, one needs to
  60.   know exactly what's wrong.  For each defect, fst prints the relevant
  61.   sector numbers.
  62.  
  63.  
  64. Sector editors for OS/2
  65. =======================
  66.  
  67. fst is not a sector editor.  There are several sector editors
  68. available for OS/2:
  69.  
  70. - DiskEdit (part of the Graham Utilities)
  71.  
  72. - SEdit (part of the GammaTech Utilities)
  73.  
  74. - HPFSTool (Shareware, ftp-os2.cdrom:/pub/os2/diskutil/hpfstl17.zip)
  75.  
  76.  
  77. Installing fst
  78. ==============
  79.  
  80. After unpacking fst03f.zip, copy FST.EXE and FST.DOC to a
  81. write-protected floppy disk.  If you have a FAT partition on a hard
  82. disk, copy FST.EXE and FST.DOC to a FAT partition.  Note that HPFS
  83. partitions are not accessible if the system has not been shutdown
  84. properly; as this is exactly the situation in which you might want to
  85. run fst, having FST.EXE on an HPFS partition won't work.
  86.  
  87. If you are installing fst on a machine which can be accessed remotely,
  88. make sure that fst cannot be run by remote users (telnet, BBS, etc.).
  89. fst's `copy' action can read any file, even files which are protected
  90. by access control or locked.
  91.  
  92.  
  93. Running fst
  94. ===========
  95.  
  96. fst is a command line oriented program.  The action to be performed
  97. and the arguments for that action are specefied in the command line of
  98. fst.
  99.  
  100.  
  101. Command line overview
  102. ---------------------
  103.  
  104. The command line has the following format:
  105.  
  106.   fst [<fst_options>] <action> [<action_options>] <arguments>
  107.  
  108. <fst_options> are optional switches which control the overall
  109. operation of fst.
  110.  
  111. <action> is a keyword specifying the action to perform.
  112.  
  113. <action_options> are optional switches which depend on <action>.
  114.  
  115. <arguments> are parameters (such as filenames) for the action,
  116. depending on <action>.
  117.  
  118.  
  119. Getting help
  120. ------------
  121.  
  122. If you run fst without any arguments, it will display a short overview
  123. over the available <fst_options> and <action>s:
  124.  
  125.   fst
  126.  
  127. To get help on a specific action, type
  128.  
  129.   fst -h <action>
  130.  
  131. where <action> is the action for which you want to get help.  Example:
  132.  
  133.   fst -h check
  134.  
  135. This will show the available <action_options> and <arguments> for the
  136. `check' action.
  137.  
  138.  
  139. fst options
  140. -----------
  141.  
  142. The following optional switches can be specified for <fst_options>:
  143.  
  144. -h      Show help about <action>.
  145.  
  146. -d      Use DosRead/DosWrite.  By default, fst uses logical disk track
  147.         I/O.  You probably never have to use the -d switch.
  148.  
  149. -n      Continue if disk cannot be locked.  By default, fst aborts if
  150.         it cannot lock the specified disk.  If the -n option is given
  151.         and the disk cannot be locked, fst continues after printing a
  152.         warning.  As the operating system may change the disk at any
  153.         time unless it is locked, fst's operation on an unlocked disk
  154.         is very unreliable.  For instance, the `check' action may
  155.         indicate errors which are not present, or may miss errors
  156.         which are present.  Snapshot files created from an unlocked
  157.         disk may be inconsistent.
  158.  
  159. -w      Enable writing to disk.  By default, fst opens the disk for
  160.         reading only.  Some actions (`write' and `restore') write to
  161.         the disk, therefore you have to use the -w option to enable
  162.         writing.  Unless the -w option is given, fst is completely
  163.         safe.
  164.  
  165. -x      Show sector numbers in hexadecimal.  By default, sector
  166.         numbers are displayed in decimal.  Some sector editors use
  167.         hexadecimal numbers for sector numbers; you might want to use
  168.         the -x option if you are using such a sector editor.
  169.  
  170.  
  171. Actions
  172. -------
  173.  
  174. Give exactly one of the following keywords for <action> on fst's
  175. command line:
  176.  
  177. info    Show information about the file system, a sector, or a path name
  178.  
  179. check   Check the file system
  180.  
  181. save    Take a snapshot of the file system
  182.  
  183. diff    Compare snapshot files, CRC files, and disks
  184.  
  185. restore Copy sectors from snapshot file to disk
  186.  
  187. dir     List a directory
  188.  
  189. copy    Copy a file from the disk
  190.  
  191. read    Copy a sector to a file
  192.  
  193. write   Write a sector from a file to disk
  194.  
  195. crc     Save CRCs for all sectors of a disk
  196.  
  197.  
  198. Arguments
  199. ---------
  200.  
  201. All commands take arguments.  At least one of these arguments (usually
  202. called <source> or <target>) designates a disk to which the action
  203. should be applied.  A disk is specified by the drive letter followed
  204. by a colon.  Example:
  205.  
  206.   fst check c:
  207.  
  208. Note that CDROM drives are not supported.  Alternatively, most actions
  209. support snapshot files in place of disks.  Example:
  210.  
  211.   fst check c951204a.ss
  212.  
  213. Snapshot files are recognized by a special signature (magic word) and
  214. are created with the `save' action.  A snapshot file contains all
  215. relevant sectors which make up the structure of the file system.  This
  216. includes all directories and most extended attributes.
  217.  
  218. Alternatively, some actions support CRC files in place of disks.
  219. Example:
  220.  
  221.   fst diff d951203a.crc d:
  222.  
  223. CRC files are recognized by a special signature (magic word) and are
  224. created with the `crc' action.  A CRC file contains one CRC (a special
  225. variant of a checksum) for each sector of its source disk.
  226.  
  227. Some actions take a sector number as argument.  Sector numbers can be
  228. given as decimal number (without leading 0), as hexadecimal number
  229. (leading 0x) or as octal number (leading 0 -- attention!).
  230.  
  231.  
  232. Output redirection
  233. ------------------
  234.  
  235. You can redirect fst's output to a file or a device or pipe the output
  236. into another program such as `more'.  Informational output (that is,
  237. output expected to be generated by a given action) is sent to